<h2><a href="<?php echo $this->baseUrl('/admin/tips-create/'); ?>">Nhập tip mới</a></h2>

<div class="parameters">
    <table cellspacing="0" cellpadding="0" class="tbLarger">
        <tr>
            <th width="50">Thời gian</th>  
            <th>Trận đấu</th>
			<th>Tip (Odd)</th>
			<th>Kết quả</th>
			<th width="100">&nbsp;</th>
        </tr>  
        <?php foreach($this->paginator as $key => $tip) { ?>
	    <tr <?php if( $key % 2 == 1 ) echo 'class="highlight"'; ?>>
			<td><?php echo date_create_from_format( 'Y-m-d H:i:s', $tip->date )->format('d/m/Y'); ?></td>
			<td><?php echo $tip->match; ?></td>
			<td><?php echo $tip->tip; ?></td>
			<td>
				<?php 
				switch($tip->result) {
					case "1":
						echo "Thắng"; break;
					case "0":
						echo "Hòa"; break;
					case "-1":
						echo "Thua"; break;
					default: 
						echo "Chưa đá"; break;
				}
				?>
			</td>
			<td><a href="<?php echo $this->baseUrl('/admin/tips-update/id/'.$tip->id); ?>">Sửa</a> | 
				<a href="<?php echo $this->baseUrl('/admin/tips-delete/id/'.$tip->id); ?>">Xóa</a>
				</td>
		</tr>
	    <?php } ?>
    </table>
    <?php
		echo $this->paginationControl($this->paginator, 'Sliding', 'partials/_pagination-control.phtml');
	?>
</div>
        